package br.com.merks.controller.vo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import br.com.merks.model.Trade;

public class TradeGraphVO {
	
	private Long marketAnswerId;
	private List<Trade> trades = new ArrayList<Trade>();

	
	public static List<String> tradeColors() {
		return Arrays.asList(new String[] {"1D8BD1","F1683C","2AD62A","DBDC25","FF8040","FF0080","FFFF00","008040","0080C0","F4EDCA","EE33FF","F1F2F3","FA0000","451234","11FFEE","00FFAA","FF0066","F6F30A"});
	}
	public static String extractColor(List<String> colors, int id) {
		int randomcolor =  1 + ((int)Math.random() * (colors.size()-1));
		String color = colors.get(randomcolor);
		if (color==null) color = "EFEGED";
		return color;
	}

	public void setTrades(List<Trade> trades) {
		this.trades = trades;
	}

	public List<Trade> getTrades() {
		return trades;
	}
	public void setMarketAnswerId(Long marketAnswerId) {
		this.marketAnswerId = marketAnswerId;
	}
	public Long getMarketAnswerId() {
		return marketAnswerId;
	}
}
